Bar codes are used in numerous applications to identify objects to which the bar codes are affixed. Examples of bar codes include the uniform price code used to identify retail goods and various forms of shipping labels used to track parcels. A bar code is an optical symbol containing coded information, in which the symbol is able to be imaged by an imaging device. The imaging device generates an image of the bar code and converts the image to machine-readable image data, referred to herein simply as "image data." The image data is output to a processor, which deciphers the image data representing the bar code to "read" the bar code. Reading the bar code is the operation of deciphering the bar code to obtain the information encoded in the bar code. The information encoded in the bar code may, as an example, identify the object to which the bar code is affixed.
A bar code may, as an example, be a representation of a character set, e.g. ASCII characters represented by binary numbers. One type of bar code format that represents a binary number consists of an array of alternating reflective and nonreflective surfaces in which the transition from one surface to an adjacent surface represents the transition from one bit to another bit of a binary number. The alternating reflective and nonreflective surfaces may, for example, be alternating reflective and nonreflective stripes. The reflective stripes are sometimes referred to herein as "spaces" and the nonreflective stripes are sometimes referred to herein as "bars." The bars may, as an example, be dark-colored stripes and the spaces may as an example, be light-colored stripes. Each stripe, thus, represents one bit of the binary number. The stripes may, as an example, be either wide or narrow. A wide stripe may represent a one and a narrow stripe may represent a zero. The binary number represented by the bar code is, thus, defined by the widths of the alternating bars and spaces.
One type of bar code format is known in the art as Code 39 or Code 3 of 9. Code 39 consists of an array of stripes, which consist of alternating bars and spaces. The bars and spaces are either wide or narrow. A character per the Code 39 format consists of ten stripes wherein the first stripe is a leading narrow space, leaving nine remaining stripes to comprise the character. Three of the remaining nine stripes are wide, giving the term 3 of 9. The arrangement of the three wide stripes and the six narrow stripes corresponds to a character set specified by the Code 39 format.
A bar code reader is a photoelectric device that is used to "read" bar codes. Reading a bar code is the process of analyzing the areas of high and low reflectivity to decipher the information encoded in the bar code. The bar code reader typically comprises an illuminator, an imaging device, and a processor. The illuminator serves to illuminate the bar code via an illumination beam of light. The illuminator may, for example, be a laser or an array of light-emitting diodes. An image beam of light constituting an image of the bar code reflects from the bar code. The imaging device receives the image beam and converts the image of the bar code to image data. The processor analyzes the image data to distinguish the areas of high reflectivity from the areas of low reflectivity. In the case of the Code 39 format, the processor distinguishes image data representing the reflective spaces from image data representing the nonreflective bars. The processor further analyzes the image data to determine the widths of the bars and spaces. Based on the analysis of the image data, the processor is able to decipher the information encoded in the bar code. Conventional bar code readers compare the widths of the stripes throughout the bar code, thus, the ratio of wide to narrow stripes must remain constant throughout the bar code.
The imaging device generates image data representing all objects intersected by the image beam. If the image beam happens to intersect an object other than a bar code, the imaging device will convert an image of the object to image data and the bar code reader will attempt to decipher the image data per a bar code format. The bar code reader will then output erroneous data to the user. A second problem occurs if the imaging device generates an erroneous image of the bar code, e.g., generating image data indicating too many stripes in the bar code. This results in the image data being in an incorrect format. When the bar code reader attempts to deciphers the erroneous image data, the bar code reader will yield an incorrect decoding of the bar code information. A third, and related, problem occurs if the widths of the stripes represented by the image data vary throughout the bar code. This may result from the speed at which the bar code was scanned varying during the scan, the bar code being moved during the scan, printing tolerances in the bar code, and other factors. The bar code reader may not be able to distinguish the wide stripes from the narrow stripes and, thus, may not be able to decipher the information encoded in the bar code.
Therefore, a need exists for a method to assure that image data received from an imaging device represents a proper bar code format regardless of deviations in the widths of the stripes comprising the bar code.